<%--
  Created by IntelliJ IDEA.
  User: XYC
  Date: 2015/7/22
  Time: 11:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ include file="/WEB-INF/jsp/component/common.jsp" %>
<link rel="stylesheet" href="${dean}/css/Genetic.css" type="text/css"/>
<html>
<head>
</head>
<body>
<div class="genetic_wrap">
	<div class="no">
		<input type="radio" id="none" name="judge"/>
		<label for="none">无</label>
	</div>
		<span>
			<input type="radio" id="have" name="judge"/>
			<label for="have">有</label>
			<input type="text" placeholder="遗传病名称" id="genetic_name" disabled/>
		</span>
	<div class="store">
		<button>保存</button>
	</div>
</div>
<%--<script type="text/javascript" src="${js}/jquery.min.js" charset="UTF-8"></script>--%>
<%--<script src="${js}/jquery.min.js"></script>--%>
<script src="${dean}/js/baseDell.js"></script>
<script src="${dean}/js/jquery-1.11.1.min.js"></script>
<script src="${dean}/js/Genetic.js" type="text/javascript"></script>
<script src="${js}/dean.js" type="text/javascript"></script>
<script type="text/javascript">
	var geneticHistory=${geneticHistory};
	$(document).ready(function(){

		if(geneticHistory==""){
			return;
		}
		var genetic =geneticHistory.genetic;
		if(genetic==""){
			$('#none').prop('checked',true);
			return;
		}
		$('#have').prop('checked',true);
		$('#genetic_name').prop('value',genetic);
		$('#genetic_name').removeAttr('disabled','disabled');
		$('#genetic_name').css('background','url(/medical-cloud/assets/dean/img/genetic_input.png)')
		/*var arrayTemp = exposureHistory.exposurecode;
		if(arrayTemp==""){
			$('#no').prop('checked',true);
			return ;
		}
		$('#yes').prop('checked',true);
		var strs = arrayTemp.split("|");
		for(var i=0;i<strs.length-1;i++){
			$("td span input[value='"+strs[i]+"']").prop('checked',true);
		}
		$('td span input').removeAttr('disabled','disabled');*/
//    alert(insurance);

/*		BindClickWithInputShow(".insurance input[value='1']",".insurance input[type=text]","${dean}/img/card_bg");
		$(".insurance input[value=1]").click( function(){BindClickWithInputShow(".insurance input[value='1']",".insurance input[type=text]","${dean}/img/card_bg")});
		$(".insurance input[type=text]").focus(function(){textDefultShow(".insurance input[type=text]",true)});
		$(".insurance input[type=text]").blur(function(){textDefultShow(".insurance input[type=text]",false)});*/
	});


	function saveData(){
		var temp="";
		$(".insurance input[type=checkbox]:checked").each(function(){
//      alert($(this).val());
			temp = temp +$(this).val()+"|";
		});

		var data=new Object();
		data["idCard"]=insurance.idCard;
		data["insurance"]=temp;

		jQuery.ajax({
			url :'${ctx}/web/patient/insurance/Set',
			type : "post",
			data:data,
			cache : false,
			dataType : "json",
			success : function(data){
				alert("鎻愪氦瀹屾垚");
			}
		});
		alert(temp);
	}
</script>
</body>
</html>
